<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <h:form id="SctstbtesisListForm">

        <p:panel header="#{myBundle.ListSctstbtesisTitle}">

            <p:dataTable id="datalist" value="#{sctstbtesisController.items}" var="item"
                         selectionMode="single" selection="#{sctstbtesisController.selected}"
                         rowKey="#{item.sctstbtesisid}"
                         paginator="true"
                         rows="5"
                         rowsPerPageTemplate="5,10,20,30"
                         >

                <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
                <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>

                <p:column sortBy="#{item.sctstbtesisid}" filterBy="#{item.sctstbtesisid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_sctstbtesisid}"/>
                    </f:facet>
                    <h:outputText value="#{item.sctstbtesisid}"/>
                </p:column>
                <p:column sortBy="#{item.titulo}" filterBy="#{item.titulo}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_titulo}"/>
                    </f:facet>
                    <h:outputText value="#{item.titulo}"/>
                </p:column>
                <p:column sortBy="#{item.autores}" filterBy="#{item.autores}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_autores}"/>
                    </f:facet>
                    <h:outputText value="#{item.autores}"/>
                </p:column>
                <p:column sortBy="#{item.fechagrado}" filterBy="#{item.fechagrado}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_fechagrado}"/>
                    </f:facet>
                    <h:outputText value="#{item.fechagrado}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.palabrasclave}" filterBy="#{item.palabrasclave}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_palabrasclave}"/>
                    </f:facet>
                    <h:outputText value="#{item.palabrasclave}"/>
                </p:column>
                <p:column sortBy="#{item.resumen}" filterBy="#{item.resumen}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_resumen}"/>
                    </f:facet>
                    <h:outputText value="#{item.resumen}"/>
                </p:column>
                <p:column sortBy="#{item.codificacion}" filterBy="#{item.codificacion}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_codificacion}"/>
                    </f:facet>
                    <h:outputText value="#{item.codificacion}"/>
                </p:column>
                <p:column sortBy="#{item.nombrearchivo}" filterBy="#{item.nombrearchivo}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_nombrearchivo}"/>
                    </f:facet>
                    <h:outputText value="#{item.nombrearchivo}"/>
                </p:column>
                <p:column sortBy="#{item.fecharegistro}" filterBy="#{item.fecharegistro}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_fecharegistro}"/>
                    </f:facet>
                    <h:outputText value="#{item.fecharegistro}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.observaciones}" filterBy="#{item.observaciones}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_observaciones}"/>
                    </f:facet>
                    <h:outputText value="#{item.observaciones}"/>
                </p:column>
                <p:column sortBy="#{item.summary}" filterBy="#{item.summary}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_summary}"/>
                    </f:facet>
                    <h:outputText value="#{item.summary}"/>
                </p:column>
                <p:column sortBy="#{item.scthtbnivacadeid.scthtbnivacadeid}" filterBy="#{item.scthtbnivacadeid.scthtbnivacadeid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_scthtbnivacadeid}"/>
                    </f:facet>
                    <h:outputText value="#{item.scthtbnivacadeid.scthtbnivacadeid}"/>
                </p:column>
                <p:column sortBy="#{item.scthtbdatosgenid.scthtbdatosgenid}" filterBy="#{item.scthtbdatosgenid.scthtbdatosgenid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_scthtbdatosgenid}"/>
                    </f:facet>
                    <h:outputText value="#{item.scthtbdatosgenid.scthtbdatosgenid}"/>
                </p:column>
                <p:column sortBy="#{item.scittbescunid.scittbescunid}" filterBy="#{item.scittbescunid.scittbescunid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_scittbescunid}"/>
                    </f:facet>
                    <h:outputText value="#{item.scittbescunid.scittbescunid}"/>
                </p:column>
                <p:column sortBy="#{item.scaltbtipoinvid.descripcion}" filterBy="#{item.scaltbtipoinvid.descripcion}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_scaltbtipoinvid}"/>
                    </f:facet>
                    <h:outputText value="#{item.scaltbtipoinvid.descripcion}"/>
                </p:column>
                <p:column sortBy="#{item.scaltblineinveid.scaltblineinveid}" filterBy="#{item.scaltblineinveid.scaltblineinveid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListSctstbtesisTitle_scaltblineinveid}"/>
                    </f:facet>
                    <h:outputText value="#{item.scaltblineinveid.scaltblineinveid}"/>
                </p:column>
                <f:facet name="footer">
                    <p:commandButton id="createButton" icon="ui-icon-plus"   value="#{myBundle.Create}" actionListener="#{sctstbtesisController.prepareCreate}" update=":SctstbtesisCreateForm" oncomplete="SctstbtesisCreateDialog.show()"/>
                    <p:commandButton id="viewButton"   icon="ui-icon-search" value="#{myBundle.View}" update=":SctstbtesisViewForm" oncomplete="SctstbtesisViewDialog.show()" disabled="#{empty sctstbtesisController.selected}"/>
                    <p:commandButton id="editButton"   icon="ui-icon-pencil" value="#{myBundle.Edit}" update=":SctstbtesisEditForm" oncomplete="SctstbtesisEditDialog.show()" disabled="#{empty sctstbtesisController.selected}"/>
                    <p:commandButton id="deleteButton" icon="ui-icon-trash"  value="#{myBundle.Delete}" actionListener="#{sctstbtesisController.delete}" update=":growl,datalist" disabled="#{empty sctstbtesisController.selected}"/>
                </f:facet>

            </p:dataTable>

        </p:panel>

    </h:form>

</ui:composition>